Optimal. Leaf size=542 \[ \frac{x \left (a^2 \left (\frac{b^4 d}{a^2}-\frac{b^2 (b e+4 c d)}{a}-a (b g+2 c f)+b^2 f+3 b c e+2 c^2 d\right )+c x^2 \left (2 a^2 (c e-a g)-a b^2 e-a b (3 c d-a f)+b^3 d\right )\right )}{2 a^3 \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{\sqrt{c} \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right ) \left (\frac{4 a^2 b (a g+4 c e)+4 a^2 c (7 c d-3 a f)-a b^2 (29 c d-a f)-3 a b^3 e+5 b^4 d}{\sqrt{b^2-4 a c}}+2 a^2 (5 c e-a g)-3 a b^2 e-a b (19 c d-a f)+5 b^3 d\right )}{2 \sqrt{2} a^3 \left (b^2-4 a c\right ) \sqrt{b-\sqrt{b^2-4 a c}}}+\frac{\sqrt{c} \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right ) \left (-\frac{4 a^2 b (a g+4 c e)+4 a^2 c (7 c d-3 a f)-a b^2 (29 c d-a f)-3 a b^3 e+5 b^4 d}{\sqrt{b^2-4 a c}}+2 a^2 (5 c e-a g)-3 a b^2 e-a b (19 c d-a f)+5 b^3 d\right )}{2 \sqrt{2} a^3 \left (b^2-4 a c\right ) \sqrt{\sqrt{b^2-4 a c}+b}}+\frac{2 b d-a e}{a^3 x}-\frac{d}{3 a^2 x^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 7.26496, antiderivative size = 542, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 35, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.114, Rules used = {1669, 1664, 1166, 205} \[ \frac{x \left (a^2 \left (\frac{b^4 d}{a^2}-\frac{b^2 (b e+4 c d)}{a}-a (b g+2 c f)+b^2 f+3 b c e+2 c^2 d\right )+c x^2 \left (2 a^2 (c e-a g)-a b^2 e-a b (3 c d-a f)+b^3 d\right )\right )}{2 a^3 \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{\sqrt{c} \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right ) \left (\frac{4 a^2 b (a g+4 c e)+4 a^2 c (7 c d-3 a f)-a b^2 (29 c d-a f)-3 a b^3 e+5 b^4 d}{\sqrt{b^2-4 a c}}+2 a^2 (5 c e-a g)-3 a b^2 e-a b (19 c d-a f)+5 b^3 d\right )}{2 \sqrt{2} a^3 \left (b^2-4 a c\right ) \sqrt{b-\sqrt{b^2-4 a c}}}+\frac{\sqrt{c} \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right ) \left (-\frac{4 a^2 b (a g+4 c e)+4 a^2 c (7 c d-3 a f)-a b^2 (29 c d-a f)-3 a b^3 e+5 b^4 d}{\sqrt{b^2-4 a c}}+2 a^2 (5 c e-a g)-3 a b^2 e-a b (19 c d-a f)+5 b^3 d\right )}{2 \sqrt{2} a^3 \left (b^2-4 a c\right ) \sqrt{\sqrt{b^2-4 a c}+b}}+\frac{2 b d-a e}{a^3 x}-\frac{d}{3 a^2 x^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1669
Rule 1664
Rule 1166
Rule 205
Rubi steps
\begin{align*} \int \frac{d+e x^2+f x^4+g x^6}{x^4 \left (a+b x^2+c x^4\right )^2} \, dx &=\frac{x \left (a^2 \left (\frac{b^4 d}{a^2}+2 c^2 d+3 b c e-\frac{b^2 (4 c d+b e)}{a}+b^2 f-a (2 c f+b g)\right )+c \left (b^3 d-a b^2 e-a b (3 c d-a f)+2 a^2 (c e-a g)\right ) x^2\right )}{2 a^3 \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}-\frac{\int \frac{-2 \left (b^2-4 a c\right ) d+\frac{2 \left (b^2-4 a c\right ) (b d-a e) x^2}{a}-\frac{\left (b^4 d-a b^3 e+6 a^2 c (c d-a f)-a b^2 (6 c d-a f)+a^2 b (5 c e+a g)\right ) x^4}{a^2}-c \left (\frac{b^3 d}{a^2}+2 c e-\frac{b (3 c d+b e)}{a}+b f-2 a g\right ) x^6}{x^4 \left (a+b x^2+c x^4\right )} \, dx}{2 a \left (b^2-4 a c\right )}\\ &=\frac{x \left (a^2 \left (\frac{b^4 d}{a^2}+2 c^2 d+3 b c e-\frac{b^2 (4 c d+b e)}{a}+b^2 f-a (2 c f+b g)\right )+c \left (b^3 d-a b^2 e-a b (3 c d-a f)+2 a^2 (c e-a g)\right ) x^2\right )}{2 a^3 \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}-\frac{\int \left (\frac{2 \left (-b^2+4 a c\right ) d}{a x^4}+\frac{2 \left (-b^2+4 a c\right ) (-2 b d+a e)}{a^2 x^2}+\frac{-5 b^4 d+3 a b^3 e-2 a^2 c (7 c d-3 a f)+a b^2 (24 c d-a f)-a^2 b (13 c e+a g)-c \left (5 b^3 d-3 a b^2 e-a b (19 c d-a f)+2 a^2 (5 c e-a g)\right ) x^2}{a^2 \left (a+b x^2+c x^4\right )}\right ) \, dx}{2 a \left (b^2-4 a c\right )}\\ &=-\frac{d}{3 a^2 x^3}+\frac{2 b d-a e}{a^3 x}+\frac{x \left (a^2 \left (\frac{b^4 d}{a^2}+2 c^2 d+3 b c e-\frac{b^2 (4 c d+b e)}{a}+b^2 f-a (2 c f+b g)\right )+c \left (b^3 d-a b^2 e-a b (3 c d-a f)+2 a^2 (c e-a g)\right ) x^2\right )}{2 a^3 \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}-\frac{\int \frac{-5 b^4 d+3 a b^3 e-2 a^2 c (7 c d-3 a f)+a b^2 (24 c d-a f)-a^2 b (13 c e+a g)-c \left (5 b^3 d-3 a b^2 e-a b (19 c d-a f)+2 a^2 (5 c e-a g)\right ) x^2}{a+b x^2+c x^4} \, dx}{2 a^3 \left (b^2-4 a c\right )}\\ &=-\frac{d}{3 a^2 x^3}+\frac{2 b d-a e}{a^3 x}+\frac{x \left (a^2 \left (\frac{b^4 d}{a^2}+2 c^2 d+3 b c e-\frac{b^2 (4 c d+b e)}{a}+b^2 f-a (2 c f+b g)\right )+c \left (b^3 d-a b^2 e-a b (3 c d-a f)+2 a^2 (c e-a g)\right ) x^2\right )}{2 a^3 \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{\left (c \left (5 b^3 d-3 a b^2 e-a b (19 c d-a f)+2 a^2 (5 c e-a g)-\frac{5 b^4 d-3 a b^3 e+4 a^2 c (7 c d-3 a f)-a b^2 (29 c d-a f)+4 a^2 b (4 c e+a g)}{\sqrt{b^2-4 a c}}\right )\right ) \int \frac{1}{\frac{b}{2}+\frac{1}{2} \sqrt{b^2-4 a c}+c x^2} \, dx}{4 a^3 \left (b^2-4 a c\right )}+\frac{\left (c \left (5 b^3 d-3 a b^2 e-a b (19 c d-a f)+2 a^2 (5 c e-a g)+\frac{5 b^4 d-3 a b^3 e+4 a^2 c (7 c d-3 a f)-a b^2 (29 c d-a f)+4 a^2 b (4 c e+a g)}{\sqrt{b^2-4 a c}}\right )\right ) \int \frac{1}{\frac{b}{2}-\frac{1}{2} \sqrt{b^2-4 a c}+c x^2} \, dx}{4 a^3 \left (b^2-4 a c\right )}\\ &=-\frac{d}{3 a^2 x^3}+\frac{2 b d-a e}{a^3 x}+\frac{x \left (a^2 \left (\frac{b^4 d}{a^2}+2 c^2 d+3 b c e-\frac{b^2 (4 c d+b e)}{a}+b^2 f-a (2 c f+b g)\right )+c \left (b^3 d-a b^2 e-a b (3 c d-a f)+2 a^2 (c e-a g)\right ) x^2\right )}{2 a^3 \left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{\sqrt{c} \left (5 b^3 d-3 a b^2 e-a b (19 c d-a f)+2 a^2 (5 c e-a g)+\frac{5 b^4 d-3 a b^3 e+4 a^2 c (7 c d-3 a f)-a b^2 (29 c d-a f)+4 a^2 b (4 c e+a g)}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right )}{2 \sqrt{2} a^3 \left (b^2-4 a c\right ) \sqrt{b-\sqrt{b^2-4 a c}}}+\frac{\sqrt{c} \left (5 b^3 d-3 a b^2 e-a b (19 c d-a f)+2 a^2 (5 c e-a g)-\frac{5 b^4 d-3 a b^3 e+4 a^2 c (7 c d-3 a f)-a b^2 (29 c d-a f)+4 a^2 b (4 c e+a g)}{\sqrt{b^2-4 a c}}\right ) \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b+\sqrt{b^2-4 a c}}}\right )}{2 \sqrt{2} a^3 \left (b^2-4 a c\right ) \sqrt{b+\sqrt{b^2-4 a c}}}\\ \end{align*}
Mathematica [A] time = 2.33592, size = 612, normalized size = 1.13 \[ \frac{\frac{6 x \left (a b \left (a^2 (-g)+a c \left (3 e+f x^2\right )-3 c^2 d x^2\right )+2 a^2 c \left (c \left (d+e x^2\right )-a \left (f+g x^2\right )\right )+a b^2 \left (a f-c \left (4 d+e x^2\right )\right )+b^3 \left (c d x^2-a e\right )+b^4 d\right )}{\left (b^2-4 a c\right ) \left (a+b x^2+c x^4\right )}+\frac{3 \sqrt{2} \sqrt{c} \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{b-\sqrt{b^2-4 a c}}}\right ) \left (-2 a^2 \left (-5 c e \sqrt{b^2-4 a c}+a g \sqrt{b^2-4 a c}+6 a c f-14 c^2 d\right )+a b \left (4 a^2 g-19 c d \sqrt{b^2-4 a c}+a f \sqrt{b^2-4 a c}+16 a c e\right )+a b^2 \left (-3 e \sqrt{b^2-4 a c}+a f-29 c d\right )+b^3 \left (5 d \sqrt{b^2-4 a c}-3 a e\right )+5 b^4 d\right )}{\left (b^2-4 a c\right )^{3/2} \sqrt{b-\sqrt{b^2-4 a c}}}-\frac{3 \sqrt{2} \sqrt{c} \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} x}{\sqrt{\sqrt{b^2-4 a c}+b}}\right ) \left (2 a^2 \left (-5 c e \sqrt{b^2-4 a c}+a g \sqrt{b^2-4 a c}-6 a c f+14 c^2 d\right )+a b \left (4 a^2 g+19 c d \sqrt{b^2-4 a c}-a f \sqrt{b^2-4 a c}+16 a c e\right )+a b^2 \left (3 e \sqrt{b^2-4 a c}+a f-29 c d\right )-b^3 \left (5 d \sqrt{b^2-4 a c}+3 a e\right )+5 b^4 d\right )}{\left (b^2-4 a c\right )^{3/2} \sqrt{\sqrt{b^2-4 a c}+b}}+\frac{24 b d-12 a e}{x}-\frac{4 a d}{x^3}}{12 a^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.048, size = 2503, normalized size = 4.6 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{3 \,{\left (a^{2} b c f - 2 \, a^{3} c g +{\left (5 \, b^{3} c - 19 \, a b c^{2}\right )} d -{\left (3 \, a b^{2} c - 10 \, a^{2} c^{2}\right )} e\right )} x^{6} -{\left (3 \, a^{3} b g -{\left (15 \, b^{4} - 62 \, a b^{2} c + 14 \, a^{2} c^{2}\right )} d + 3 \,{\left (3 \, a b^{3} - 11 \, a^{2} b c\right )} e - 3 \,{\left (a^{2} b^{2} - 2 \, a^{3} c\right )} f\right )} x^{4} + 2 \,{\left (5 \,{\left (a b^{3} - 4 \, a^{2} b c\right )} d - 3 \,{\left (a^{2} b^{2} - 4 \, a^{3} c\right )} e\right )} x^{2} - 2 \,{\left (a^{2} b^{2} - 4 \, a^{3} c\right )} d}{6 \,{\left ({\left (a^{3} b^{2} c - 4 \, a^{4} c^{2}\right )} x^{7} +{\left (a^{3} b^{3} - 4 \, a^{4} b c\right )} x^{5} +{\left (a^{4} b^{2} - 4 \, a^{5} c\right )} x^{3}\right )}} - \frac{-\int \frac{a^{3} b g +{\left (a^{2} b c f - 2 \, a^{3} c g +{\left (5 \, b^{3} c - 19 \, a b c^{2}\right )} d -{\left (3 \, a b^{2} c - 10 \, a^{2} c^{2}\right )} e\right )} x^{2} +{\left (5 \, b^{4} - 24 \, a b^{2} c + 14 \, a^{2} c^{2}\right )} d -{\left (3 \, a b^{3} - 13 \, a^{2} b c\right )} e +{\left (a^{2} b^{2} - 6 \, a^{3} c\right )} f}{c x^{4} + b x^{2} + a}\,{d x}}{2 \,{\left (a^{3} b^{2} - 4 \, a^{4} c\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: NotImplementedError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]